package com.alan.wifishare.presenter;

import android.net.wifi.ScanResult;

import com.alan.libapi.model.business.SharedWifiInfo;
import com.alan.wifishare.app.GlobalField;
import com.alan.wifishare.model.business.ScanedWifiInfo;
import com.alan.wifishare.utils.BusinessUtil;
import com.alan.wifishare.view.iview.IVSHAWifiScan;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @className: SHAWifiScanPS
 * @describtion: SHAWifiScanPS
 * @author: AlanWang
 * @email: 850267876@qq.com
 * @time: 2016/4/27 18:20
 */
public class SHAWifiScanPS {

    private IVSHAWifiScan ivshaWifiScan;

    public SHAWifiScanPS(IVSHAWifiScan ivshaWifiScan) {
        this.ivshaWifiScan = ivshaWifiScan;
    }

    public void scanWifi(){
        // 扫描周围的wifi
        GlobalField.wifiUtil.openWifi();
        GlobalField.wifiUtil.startScan();
        ivshaWifiScan.showScanedWifiList(BusinessUtil.checkScanedWifiIsShared(GlobalField.wifiUtil.getWifiList(), GlobalField.sharedWifiInfoList));
    }

}
